In this R project, all the scripts for the manuscript Plankton blooms over the annual cycle shape trophic interactions under climate change are available.
All the analyses were done with R version 4.1.1 (2021-08-10) on the platform x86_64-apple-darwin17.0.
Note that Figure numbering might not be the same as the one in the manuscript.
# 1. Download the data
source("Scripts/DownloadData.R")
# 2. Calculate the phenology metrics and the phyisical variables
source("Scripts/PhenologyZP.R")
source("Scripts/PhenologyPP.R")
source("Scripts/Physical.R")
# 3. Run the analysis
source("Scripts/PlanktonSuccession.R")
source("Scripts/Trends.R")
source("Scripts/GLM.R")
# 4. Run the supplementary analyses
source("Scripts/DifferenceStations.R")
source("Scripts/Nauplii.R")
source("Scripts/FreqPhytoProp.R")
source("Scripts/Validation_Trends.R")
This script can be used to download the phytoplankton and zooplankton time series data as well as the abiotic parameter.
In this script the Zooplankton metrics are calculated:
In this script the Phytoplankton metrics are calculated:
In this script the Abiotic factor are calculated:
In this script the Fig. 1b and Fig. 3 are made:
In this script the Trends are analysed:
In this script the Generalized Linear Models are made:
In this script Fig. S5 is produced showing seasonal abundance dynamics of Acartia, Pseudocalanus, Temora and Centropages nauplii stages are plotted
In this script the Fig. S1 and Fig. 1 are produced:
In this script Fig. S6 is produced:
First, the raw data were downloaded and are publicly available:
DownloadDataNote that data were downloaded using the shaRk Rpackage for this analysis. If the data are downloaded throughout the Sharkweb, make sure to update the headers accordingly.
The zooplankton bodymass were retrived from the HELCOM COMBINE manual, are shown in the Table S1 of the manuscript, and should have this structure to be compatible with the scripts:
#> 'data.frame': 132 obs. of 8 variables:
#> $ Taxa : chr "Temora" "Temora" "Temora" "Temora" ...
#> $ STAGE : chr "AD" "AD" "AD" "C1" ...
#> $ SEXCO : chr "F" "M" "NS" "NS" ...
#> $ Station: chr "BY31" "BY31" "BY31" "BY31" ...
#> $ Jan.Mar: num 60 55 57.5 9 18 60 55 57.5 9 18 ...
#> $ Apr.Jun: num 65 40 52.5 6 15 65 55 60 6 15 ...
#> $ Jul.Sep: num 60 45 52.5 6 15 40 45 42.5 6 15 ...
#> $ Oct.Dec: num 50 50 50 4 14 50 45 47.5 6 15 ...
Where:
Taxa corresponds to the Taxa of interestSTAGE corresponds to the Stage of the organism
(AD, C1, C4, JV or
NS)SEXCO corresponds to the sex code of the organism
(F, M, NS)Stationcorresponds to the station (BY31,
BY15 or BY5)Jan.Mar corresponds to the bodymass in WinterApr.Jun corresponds to the bodymass in SpringJul.Sep corresponds to the bodymass in SummerOct.Dec corresponds to the bodymass in AutumnIn the folder Output/Data all the needed data can be found.
This dataset is produced at the end of the script
Phenology_ZP.R
It has this structure:
#> 'data.frame': 315 obs. of 11 variables:
#> $ Taxa : chr "Acartia" "Acartia" "Acartia" "Acartia" ...
#> $ Year : int 2008 2008 2008 2009 2009 2009 2010 2010 2010 2011 ...
#> $ Station : chr "BY15" "BY31" "BY5" "BY15" ...
#> $ Group : chr "Copepoda" "Copepoda" "Copepoda" "Copepoda" ...
#> $ Timing : int 21 26 24 29 32 27 32 34 29 26 ...
#> $ Maximum : num 84.3 118.4 36.4 78.9 36.6 ...
#> $ Magnitude: num 52 66.8 24.6 38 18.6 ...
#> $ Start : num 9 20 11.5 20 22.5 ...
#> $ End : num 28.3 33.5 35.5 34.8 40.7 ...
#> $ Middle : num 21 24.2 24.5 30 34 ...
#> $ Duration : num 19.3 13.5 24 14.8 18.2 ...
Where:
Taxa: Mesozooplankton taxa: characterYear: Year between 2008 and 2022, integerStation: the three stations BY31, BY15, and BY5,
characterGroup: Group of mesozooplankton taxa: Copepoda,
Cladocera, and Rotatoria, characterTiming: Bloom peak timing (Week #),
numericMaximum: Bloom magnitude maximum (\(\mu\)g L-1),
numericMagnitude: Bloom magnitude (\(\mu\)g L-1),
numericStart: Start of the growing season, correspond to the
25th percentile of the cumulative biomass (Week #),
numericEnd: End of the growing season, correspond to the
75th percentile of the cumulative biomass (Week #),
numericMiddle: Middle of the growing season, correspond to the
50th percentile of the cumulative biomass (Week #),
numericDuration: Time span between the Start and the End of
the growing season (Week #), numericThis dataset is produced at the end of the script
Phenology_PP.R
It has this structure:
#> 'data.frame': 404 obs. of 11 variables:
#> $ Taxa : chr "Cyanobacteria" "Cyanobacteria" "Cyanobacteria" "Dinoflagellates" ...
#> $ Year : int 2008 2008 2008 2008 2008 2008 2008 2008 2008 2008 ...
#> $ Station : chr "BY15" "BY31" "BY5" "BY15" ...
#> $ Group : chr "Phytoplankton" "Phytoplankton" "Phytoplankton" "Phytoplankton" ...
#> $ Timing : int 26 31 30 17 17 19 25 26 24 21 ...
#> $ Maximum : num 60.3 14.3 117 67.7 43.4 ...
#> $ Magnitude: num 55.66 8.44 91.21 59.57 30.2 ...
#> $ Start : num 23.7 24.8 27.6 14.5 14.8 ...
#> $ End : num 29 34.2 30.9 19.1 18 ...
#> $ Middle : num 26.4 29.8 29.5 16.7 16.6 ...
#> $ Duration : num 5.33 9.45 3.25 4.6 3.23 ...
Where:
Taxa: Phytoplankton taxa, See Table S3 for more
information characterYear: Year between 2008 and 2021, integerStation: the three stations BY31, BY15, and BY5,
characterGroup: Group of phytoplankton taxa: only Phytoplankton,
characterTiming: Bloom peak timing (Week #),
numericMaximum: Bloom magnitude maximum (\(\mu\)gC L-1),
numericMagnitude: Bloom magnitude (\(\mu\)gC L-1),
numericStart: Start of the growing season, correspond to the
25th percentile of the cumulative biomass (Week #),
numericEnd: End of the growing season, correspond to the
75th percentile of the cumulative biomass (Week #),
numericMiddle: Middle of the growing season, correspond to the
50th percentile of the cumulative biomass (Week #),
numericDuration: Time span between the Start and the End of
the growing season (Week #), numericThis dataset is produced with the script Physical.R
It has this structure:
#> 'data.frame': 4600 obs. of 6 variables:
#> $ Year : int 2007 2007 2007 2007 2007 2007 2007 2007 2007 2007 ...
#> $ month : int 1 1 1 1 1 1 1 1 1 1 ...
#> $ Parameter: chr "Nutrient" "Nutrient" "Nutrient" "Oxy_0.20" ...
#> $ Station : chr "BY15" "BY31" "BY5" "BY15" ...
#> $ Value : num 2.64 3.81 3.04 7.92 7.85 ...
#> $ n : int 1 1 1 1 1 1 1 1 1 1 ...
Where:
Year: Year of the sampling event, integermonth: Month of the sampling event. 1 corresponds to
January, 2 to February, and so on, integerParameter: Parameter sampled. character
Station: Station sampled, characterValue: value of the parameter, numericn: number of observation, integerNote that data were downloaded using the shaRk Rpackage for this analysis. If the data are downloaded throughout the Sharkweb, make sure to update the headers accordingly.↩︎
Note that data were downloaded using the shaRk Rpackage for this analysis. If the data are downloaded throughout the Sharkweb, make sure to update the headers accordingly.↩︎
Note that data were downloaded using the shaRk Rpackage for this analysis. If the data are downloaded throughout the Sharkweb, make sure to update the headers accordingly.↩︎